﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics.Contracts;

namespace DesignByContract.CodeContracts
{
    public class LivretA : CEL
    {
        public LivretA() : base("9999") { }

        public override double ComputeInterest(double amount, double rate)
        {
            //Additional Pre-Condition 
            Contract.Requires(rate > 0, "The interest rate must be higher than 0.");

            return base.ComputeInterest(amount, rate);
        }
    }
}
